#ifndef CARTESIAN_TO_FRENET_H
#define CARTESIAN_TO_FRENET_H

#include <vector>
#include <utility> // for std::pair
#include <cmath>
#include <limits>
#include <nav_msgs/Odometry.h>
#include "paths_struct.h"

class CartesianToFrenet {
public:
    CartesianToFrenet() = default;
    ~CartesianToFrenet() = default;

    double distance(const Point& a, const Point& b);
    Point getProjection(const Point& a, const Point& b, const Point& p);
    void cartesianToFrenet(const std::vector<std::pair<double, double>>& xy_points, Point& xy, double& s, double& d, int& index);
    void cartesian_Frenet(const std::vector<std::pair<double, double>>& xy_points, Point& xy, double& s, double& d);
    std::pair<double, double>  ConvertToCartesian(const std::vector<std::pair<double, double>>& glob_path, double s, double d, 
                                                                                                        std::vector<double>& accumulated_s, int& vehicle_index);

private:

};

#endif // CARTESIAN_TO_FRENET_H
